<?php
require_once 'b2shujuku.php';
header("content-type:text/html;charset=utf-8");

$name = $_POST['name'];
$password =md5($_POST['password']);//md5为单向加密
$password = md5($password);

$sql = "
INSERT INTO  `erciyuan`.`renwu` (
`id` ,
`name` ,
`password` ,
`time`
)
VALUES (
NULL ,  '$name',  '$password',  '');";//引号里面要对应上面$字符

$result = $conn->query($sql);
if($result === false ){
    echo "注册失败！";
}
else {
    echo "注册成功！"; header("Location b2word.php");
}
